package com.bj58.mis.apm.server.statistics.query.cube;

import com.bj58.mis.apm.server.core.util.ParameterUtils;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
 * @author: zhangfx
 * @create: 2018-06-19 17:34
 **/
@ApiModel(description = "Cube条件")
@Data
public class CubeQuery {
    @ApiModelProperty(value = "数据表名")
    private String tableName;
    @ApiModelProperty(value = "cube标示")
    private String cubeCode;
    @ApiModelProperty(value = "cube名称")
    private String cubeName;
    @ApiModelProperty(value = "项目")
    private String projectId;
    @ApiModelProperty(value = "状态： READY、DISABLED")
    private String status;
    @ApiModelProperty(value = "负责人OA账号")
    private String owner;

    @ApiModelProperty(value = "创建人OA账号")
    private String creater;
    @ApiModelProperty(value = "修改人OA账号")
    private String mender;

    @ApiModelProperty(value = "开始时间")
    private String startDate;
    @ApiModelProperty(value = "结束时间")
    private String endDate;
    @ApiModelProperty(value = "开始构建时间")
    private String startBuildDate;
    @ApiModelProperty(value = "结束构建时间")
    private String endBuildDate;

    @ApiModelProperty(value = "不再查询的时间")
    private String noLongerQueryDate;

    @ApiModelProperty(value = "排序，eg：dataSize asc, queryCount desc; asc:生序，desc：降序")
    private String orderBy;

    /**
     * 返回模糊查询tablename
     * @return 返回模糊查询tablename
     */
    public String getTableNameLike() {
        return ParameterUtils.getBLikeValue(this.tableName);
    }

    /**
     * 返回模糊查询cubeName
     * @return 返回模糊查询cubeName
     */
    public String getCubeNameLike() {
        return ParameterUtils.getBLikeValue(this.cubeName);
    }


    /**
     * 返回模糊查询cubeCode
     * @return 返回模糊查询cubeCode
     */
    public String getCubeCodeLike() {
        return ParameterUtils.getBLikeValue(this.cubeCode);
    }



}
